 //*******************************************************
 // test.java        Author:20172323wyh
 //*******************************************************

 import java.util.Scanner;

 public class test
 {
    public static void main(String[] args)
    {
       int na, nb, nc, MAX;
       Scanner scan = new Scanner(System.in);

       System.out.println("Enter the MAX-number: ");
       MAX = scan.nextInt();

       na = 1;
       nb = 1;
       while (na <= MAX )
             {
               nb = na * nb;
               na++;
             }
       System.out.println("use the while loop--n!:" + nb);

       for ( na = nb = 1; na <= MAX; na++)
           {
             nb = na * nb;
           }
       System.out.println("use the for loop--n!:" + nb);   
              
             
    }
 }
         
             
